Expand description
§ergokv
ergokv
is a library for easy integration with TiKV, providing derive macros for automatic CRUD operations.
§Usage
Add this to your Cargo.toml
:
[dependencies]
ergokv = "0.1"
Then, in your Rust file:
use ergokv::Store;
use serde::{Serialize, Deserialize};
use uuid::Uuid;
#[derive(Store, Serialize, Deserialize)]
struct User {
#[key]
id: Uuid,
#[index]
username: String,
email: String,
}
This will generate load
, save
, delete
, by_username
, set_username
, and set_email
methods for User
.
Re-exports§
pub use ciborium;
pub use futures;
pub use serde_json;
Structs§
- A structure storing a local cluster.
- A prefix trie implementation that stores its nodes in TiKV.
Functions§
- Helper function to connect to a single or multiple TiKV pd-server
Derive Macros§
- Derives the
Store
trait for a struct, generating methods for CRUD operations in TiKV.